package com.itheima;

import java.io.File;

public class CountFiles {
    public static int countFiles(String catalogue){
        File f = new File(catalogue);
        if(f.isDirectory())
        {
            File[] files = f.listFiles();
            if(files != null)
            {
                return files.length;
            }
        }
        return 0;
    }
}